<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head th:include="include :: header"></head>
<body class="hold-transition skin-blue sidebar-mini">
<section class="content-header">
    <h1>调拨入库</h1>
</section>
<!--修改数量单位模态框-->
<!--<div class="modal fade" id="modal-update">
    <div class="modal-dialog" style="width: 750px; height: 600px">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title">修改调拨记录</h4>
            </div>
            <div class="modal-body">
                <form id="updateForm" class="form-horizontal" role="form" style="margin-right: 70px">
                    <input type="hidden" id="ardId" name="ardId">
                    <input type="hidden" id="ardFormCode" name="ardFormCode">
                    <div class="form-group">
                        <label class="col-sm-2 control-label no-padding-right">物料描述</label>
                        <div class="col-sm-4">
                            <input type="text" id="odaMatName" name="odaMatName"
                                   class="form-control" readonly="readonly">
                        </div>
                        <label class="col-sm-2 control-label no-padding-right">物料编码</label>
                        <div class="col-sm-4">
                            <input type="text" id="odaSapCode" name="odaSapCode"
                                   class="form-control" readonly="readonly">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label no-padding-right">跟踪号</label>
                        <div class="col-sm-4">
                            <input type="text" id="odaTrackCode" name="odaTrackCode"
                                   class="form-control" readonly="readonly">
                        </div>
                        <label class="col-sm-2 control-label no-padding-right">项目编号</label>
                        <div class="col-sm-4">
                            <input type="text" id="odaProCode" name="odaProCode"
                                   class="form-control" readonly="readonly">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label no-padding-right">项目名称</label>
                        <div class="col-sm-4">
                            <input type="text" id="odaProName" name="odaProName"
                                   class="form-control" readonly="readonly">
                        </div>
                        <label class="col-sm-2 control-label no-padding-right">金额</label>
                        <div class="col-sm-4">
                            <input type="text" id="odaAmount" name="odaAmount"
                                   class="form-control" readonly="readonly">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label no-padding-right">单位</label>
                        <div class="col-sm-4">
                            <input type="text" id="odaUnit" name="odaUnit"
                                   class="form-control">
                        </div>
                        <label class="col-sm-2 control-label no-padding-right">数量</label>
                        <div class="col-sm-4">
                            <input type="text" id="odaAvaNum" name="odaAvaNum"
                                   class="form-control" onkeyup="changeNum()">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label no-padding-right">单价</label>
                        <div class="col-sm-4">
                            <input type="text" id="odaPrice" name="odaPrice"
                                   class="form-control" readonly="readonly">
                        </div>
                        <label class="col-sm-2 control-label no-padding-right">记账日期</label>
                        <div class="col-sm-4">
                            <input type="text" id="odaStorageDate" name="odaStorageDate"
                                   class="form-control datepicker">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label no-padding-right">箱号</label>
                        <div class="col-sm-4">
                            <input type="text" id="odaCaseNo" name="odaCaseNo"
                                   class="form-control">
                        </div>
                        <label class="col-sm-2 control-label no-padding-right">装箱日期</label>
                        <div class="col-sm-4">
                            <input type="text" id="odaBoxingDate" name="odaBoxingDate"
                                   class="form-control datepicker">
                        </div>
                    </div>
                    <div class="form-group">
                        &lt;!&ndash;<label class="col-sm-2 control-label no-padding-right">库房</label>
                        <div class="col-sm-4">
                            <input type="text" id="odaWhiIdName" name="odaWhiIdName"
                                   class="form-control">
                        </div>&ndash;&gt;
                        <label class="col-sm-2 control-label no-padding-right">区位</label>
                        <div class="col-sm-4">
                            <input type="text" id="odaPosition" name="odaPosition"
                                   class="form-control">
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-info" id="btn-edit">确定</button>
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
            </div>
        </div>
    </div>
</div>
&lt;!&ndash;选择外购件库存模态框&ndash;&gt;
<div class="modal fade" id="modal-select">
    <div class="modal-dialog" style="width: 1350px;">
        <div class="modal-content">
            <div class="modal-header" style="padding-bottom: 0px;">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title">调拨记录选择</h4>
            </div>
            <div class="modal-body" style="padding-bottom: 5px;padding-top: 0px;">
                <div class="row">
                    <div class="col-xs-12">
                        <div class="box">
                            <div class="box-header" style="padding-bottom: 0px;">
                                <form id="queryForm">
                                    <div class="row" id="HiddenDiv">
                                        <div class="form-inline">
                                            <div class="form-group">
                                                <label>调拨单号</label>
                                                <input type="text" id="ardFormCodeQuery" name="ardFormCodeQuery" placeholder="请输入调拨单号"
                                                       class="form-control">
                                            </div>
                                            <div class="form-group">
                                                <label>往来部门</label>
                                                <input type="text" id="ardDeptName" name="ardDeptName"
                                                       placeholder="请输入往来部门" class="form-control">
                                            </div>
                                            <div class="form-group">
                                                <label>经手人</label>
                                                <input type="text" id="ardRequester"
                                                       name="ardRequester" placeholder="请输入经手人" class="form-control">
                                            </div>
                                            <div class="form-group">
                                                <label>物料描述</label>
                                                <input type="text" id="ityMatName" name="ityMatName" class="form-control"
                                                placeholder="请输入物料描述">
                                            </div>
                                            <div class="form-group">
                                                <label>项目编号</label>
                                                <input type="text" id="ityProCode" name="ityProCode" class="form-control"
                                                       placeholder="请输入项目编号">
                                            </div>
                                            <div class="form-group">
                                                <button type="button" class="btn btn-success" id="btn_inventorySearch">
                                                    搜索
                                                </button>
                                            </div>
                                        </div>
                                    </div>
                                </form>
                            </div>
                            <div class="box-body" style="padding-top: 0px;padding-bottom: 0px;height: 600px">
                                <table id="bootstrap-table"></table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="modal-footer" style="padding-top: 5px;">
                <button type="button" class="btn btn-info" id="btn-commit">确定</button>
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
            </div>
        </div>
    </div>

</div>-->

<section class="content">
    <div class="row">
        <div class="col-xs-12">
            <div class="box">
                <div class="box-body" style="padding: 0px">
                    <div class="form-group">
                        <div class="row" style="margin-top: 5px">
                            <div class="form-inline">
                                <form id="form1">
                                    <div class="form-group">
                                        <label>单据编号</label>

                                        <input type="hidden" id="odrId" name="odrId" th:value="${order.odrId}">
                                        <input type="text" class="form-control" th:value="${order.odrCode}" disabled="disabled"/>
                                    </div>
                                    <div class="form-group">
                                        <label>经手人</label>
                                        <input type="text" class="form-control" id="odrChecker"
                                               name="odrChecker" th:value="${order.odrChecker}" disabled="disabled"/>
                                    </div>
                                    <div class="form-group">
                                        <label>仓库</label>
                                        <input type="text" class="form-control" id="odaWhiIdName"
                                               name="odaWhiIdName" readonly="readonly"/>
                                    </div>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
                <div id="allocationInWarTableDiv">
                    <table id="bootstrap-table"></table>
                </div>
            </div>
        </div>
    </div>
    </div>
</section>
<div th:include="include :: footer"></div>
<script th:inline="javascript">
    var table;
    var data;
    var table1;
    var table2;
    var table3;

    /**
     *@FunctionName: findWarehouseList
     *@Description: 获取仓库列表
     *@Author: th
     *@CreateDate: 2020/3/24 15:31
     *@Phone: 18241927380
     *@Version: 1.0.0
     */
    function findWarehouseList() {
        js.ajax({
            url: ctx + 'common/warehouseInfo/list',
            type: 'post',
            traditional: true,            // 阻止深度序列化， 使参数可以使用数组
            dataType: 'json',
            contentType: "application/x-www-form-urlencoded",
            data: {},
            async: true,                // 异步执行
            success: function (result) {
                if (result.type === web_status.SUCCESS) {
                    $('#odaOutWhiId').empty();
                    $('#odaOutWhiId').append('<option value="0">请选择</option>');
                    $('#ityWhiId').empty();
                    $('#ityWhiId').append('<option value="0">请选择</option>');

                    $('#odaInWhiId').empty();
                    for (var i = 0; i < result.data.rows.length; i++) {
                        $('#odaOutWhiId').append('<option value="' + result.data.rows[i].whiId + '">' + result.data.rows[i].whiCode + '</option>');
                        $('#ityWhiId').append('<option value="' + result.data.rows[i].whiId + '">' + result.data.rows[i].whiCode + '</option>');
                        if (result.data.rows[i].whiCode == "成品库") {
                            $('#odaInWhiId').append('<option value="' + result.data.rows[i].whiId + '">' + result.data.rows[i].whiCode + '</option>');
                        }
                    }
                    $('#odaInWhiId option:checked').text("成品库");
                    $('#odaInWhiId').attr("readonly", "readonly");
                } else {
                    js.modal.warning(result.msg);
                }
            },
            error: function () {
                js.modal.fail();
            }
        })
    }

    /**
     *@FunctionName: findDeptList
     *@Description: 获取部门列表
     *@Author: th
     *@CreateDate: 2020/3/24 13:27
     *@Phone: 18241927380
     *@Param:
     *@Return:
     *@Version:
     */
    function findDeptList() {
        js.post({
            url: ctx + "purWarOutManage/findDeptList",
            data: {},
            contentType: "application/json",
            success: function (result) {
                if (result.type == 'SUCCESS') {
                    var list = result.data;
                    $('#odrTakeWorkshop').empty();
                    $('#odrTakeWorkshop').append('<option value="0">请选择</option>');
                    for (var i = 0; i < list.length; i++) {
                        $('#odrTakeWorkshop').append('<option value="' + list[i].depName + '">' + list[i].depName + '</option>');
                    }
                }
            }
        });
    }

    var _index;
    var _num1;
    var _num2;

    //点击入库修改 弹出模态框
    function updateIn(index) {
        _index = index;
        js.modal.open("modal-update");
        var row = $('#bootstrap-table2').bootstrapTable('getData')[index];
        $("#updateForm").fillData(row);
        _num1 = $("#odaNum").val();
    }

    //修改数量变单价
    function changeNum() {
        var amount = $("#odaAmount").val();
        var num = $("#odaNum").val();
        var p = amount / num;
        var price = Math.round(p * 100) / 100;
        $("#odaPrice").val(price);
    }

    /**
     * 出库单删除按钮点击事件
     */
    function updateExec(id) {
        js.post({
            url: ctx + "half/halWarManage/allocationInWar/deleteAllocation",
            data: {ardId: id},
            success: function (result) {

                $('#bootstrap-table3').bootstrapTable('destroy');
                initTable3(result.data.rows);
            }
        })
    }

    /*function initTable1(data) {
        table1 = js.table.init({
            id: 'bootstrap-table1',
            data: data,
            sortable: true,                                    // 是否启用排序
            sortStable: true,                                  // 设置为 true 将获得稳定的排序
            showColumns: false,
            showExport: false,
            correctFormat: true,
            clickToSelect: true,
            pageSize: 15,
            columns: [
                {
                    title: '序号', field: 'ardId', width: '40',
                    formatter: function (value, row, index) {
                        return index + 1;
                    }
                },
                {title: '物料描述', field: 'odaMatName'},
                {title: 'SAP物料编码', field: 'odaSapCode'},
                {title: '图号', field: 'odaDrawingCode'},
                {title: '数量', field: 'odaAvaNum'},
                {title: '单位', field: 'odaUnit'},
                {title: '单价', field: 'odaPrice'},
                {title: '金额', field: 'odaAmount'},
                {title: '跟踪号', field: 'odaTrackCode'},
                {title: '项目编号', field: 'odaProCode'},
                {title: '项目名称', field: 'odaProName'},
                {title: '部分名称', field: 'odaPart'},
                {title: '品牌', field: 'odaBrand'},
                {title: '在库类型', field: 'odaStockType'},
                {title: '记账日期', field: 'ityStorageDate'},
                {title: '备注', field: 'odaRemark'}
            ]
        });
    }*/

    function initTable2(data) {
        table2 = js.table.init({
            id: 'bootstrap-table2',
            data: data,
            sortable: true,                                    // 是否启用排序
            sortStable: true,                                  // 设置为 true 将获得稳定的排序
            showColumns: false,
            showExport: false,
            clickToSelect: true,
            singleSelect: true,
            pageSize: 15,
            columns: [
                {
                    title: '序号', field: 'ardId', width: '40',
                    formatter: function (value, row, index) {
                        return index + 1;
                    }
                },
                {title: '调拨单号', field: 'ardFormCode', visible: false},
                {title: '物料描述', field: 'odaMatName'},
                {title: 'SAP物料编码', field: 'odaSapCode'},
                {title: '图号', field: 'odaDrawingCode'},
                {title: '数量', field: 'odaAvaNum'},
                {title: '单位', field: 'odaUnit'},
                {title: '单价', field: 'odaPrice'},
                {title: '金额', field: 'odaAmount'},
                {title: '跟踪号', field: 'odaTrackCode'},
                {title: '项目编号', field: 'odaProCode'},
                {title: '项目名称', field: 'odaProName'},
                {title: '部分名称', field: 'odaPart'},
                {title: '品牌', field: 'odaBrand'},

                {
                    title: '在库类型', field: 'odaStockType',
                    formatter: function (value, row, index) {
                        if (row.odaStockType == 1) {
                            return "库存在库"
                        } else if (row.odaStockType == 2) {
                            return "项目在库"
                        } else {
                            return row.odaStockType
                        }
                    }
                },
                {title: '备注', field: 'odaRemark'},
                {title: '箱号', field: 'odaCaseNo'},
                {title: '装箱日期', field: 'odaBoxingDate'},
                //{title: '库房', field: 'odaWhiId'},
                {title: '区位', field: 'odaPosition'},
                {title: '记账日期', field: 'ityStorageDate'},
                {
                    title: '操作', width: '60',
                    formatter: function (value, row, index) {
                        var actions = [];
                        if (hasP("materialdictionary:edit")) {
                            actions.push('<a class="btn btn-info btn-xs" href="javascript:void(0)"  onclick="updateIn(' + index + ')"> 修改</a>');
                        }
                        return actions.join('');
                    }
                }
            ]
        });
    }

    /*function initTable3(data) {
        table3 = js.table.init({
            id: 'bootstrap-table3',
            data: data,
            sortable: true,                                    // 是否启用排序
            sortStable: true,                                  // 设置为 true 将获得稳定的排序
            showColumns: false,
            showExport: false,
            clickToSelect: true,
            pageSize: 15,
            columns: [
                {
                    title: '序号', field: 'ardId', width: '40',
                    formatter: function (value, row, index) {
                        return index + 1;
                    }
                },
                {title: '调拨单号', field: 'ardFormCode', visible: false},
                {title: '物料描述', field: 'odaMatName'},
                {title: 'SAP物料编码', field: 'odaSapCode'},
                {title: '图号', field: 'odaDrawingCode'},
                {title: '数量', field: 'odaNum'},
                {title: '单位', field: 'odaUnit'},
                {title: '单价', field: 'odaPrice'},
                {title: '金额', field: 'odaAmount'},
                {title: '跟踪号', field: 'odaTrackCode'},
                {title: '项目编号', field: 'odaProCode'},
                {title: '项目名称', field: 'odaProName'},
                {title: '部分名称', field: 'odaPart'},
                {title: '品牌', field: 'odaBrand'},
                {title: '备注', field: 'odaRemark'},
                {title: '在库类型', field: 'odaStockType'},
                {
                    title: '操作', width: '60',
                    formatter: function (value, row, index) {
                        var actions = [];
                        if (hasP("materialdictionary:edit")) {
                            // actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)" id="btn-updateExec"> 删除</a>');
                            actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="updateExec(' + row.ardId + ')"> 删除</a>');
                        }
                        return actions.join('');
                    }
                }
            ]
        });
    }*/

    /**
     *@Description: 就绪函数
     *@Author: th
     *@CreateDate: 2020/3/31 12:48
     *@Phone: 18241927380
     *@Version: 1.0.0
     */
    $(function () {

       /* // 选择库存模态框
        $("#btn-select").click(function () {
            js.modal.open("modal-select")
        });
        // 选择库存模态框打开事件
        js.modal.openEvent("modal-select", function () {

            initTable();
        });
        js.modal.hideEvent("modal-select", function () {
            js.table.destroy(table);
            js.reset("queryForm");
        });

        //initTable1(1);
        initTable2(1);
        //initTable3(1);

        //查询调拨记录模态框
        function initTable() {
            table = js.table.init({
                url: ctx + "half/halWarManage/allocationInWar/record",
                sortable: true,                                    // 是否启用排序
                sortStable: true,                                  // 设置为 true 将获得稳定的排序
                showColumns: false,
                showExport: false,
                singleSelect: true,
                clickToSelect: true,
                pageSize: 15,
                columns: [
                    {checkbox: true},
                    {
                        title: '序号', field: 'ardId', width: '40',
                        formatter: function (value, row, index) {
                            return index + 1;
                        }
                    },
                    {title: '调拨单号', field: 'ardFormCode'},
                    {title: '跟踪号', field: 'ardTrackCode'},
                    {title: '物料描述', field: 'ardSapMatDesc'},
                    {title: 'SAP物料编码', field: 'ardMatCode'},
                    {title: '数量', field: 'ardNum'},
                    {title: '单位', field: 'ardUnit'},
                    {title: '单价', field: 'ardPrice'},
                    {title: '金额', field: 'ardAmount'},
                    {title: '项目编号', field: 'ardProCode'},
                    {title: '项目名称', field: 'ardProName'},
                    {title: '经手人', field: 'ardRequester'},
                    {title: '往来部门', field: 'ardDepName'}
                    //{title: '入库状态', field: 'ardExecStatus'}
                ]
            });
        }*/
        table = js.table.init({
            //id: 'bootstrap-table2',
            url: ctx + "half/halWarManage/inAndOutQuery/allocationList",
            queryForm: "form1",
            //sortable: true,                                    // 是否启用排序
            //sortStable: true,                                  // 设置为 true 将获得稳定的排序
            showColumns: false,
            showExport: false,
            //clickToSelect: true,
            //singleSelect: true,
            //pageSize: 15,
            columns: [
                {
                    title: '序号', field: 'ardId', width: '40',
                    formatter: function (value, row, index) {
                        return index + 1;
                    }
                },
                {title: '调拨单号', field: 'ardFormCode', visible: false},
                {title: '物料描述', field: 'odaMatName'},
                {title: 'SAP物料编码', field: 'odaSapCode'},
                //{title: '图号', field: 'odaDrawingCode'},
                {title: '数量', field: 'odaNum'},
                {title: '单位', field: 'odaUnit'},
                {title: '单价', field: 'odaPrice'},
                {title: '金额', field: 'odaAmount'},
                {title: '跟踪号', field: 'odaTrackCode'},
                {title: '项目编号', field: 'odaProCode'},
                {title: '项目名称', field: 'odaProName'},
                {title: '部分名称', field: 'odaPart'},
                {title: '品牌', field: 'odaBrand'},

                {
                    title: '在库类型', field: 'odaStockType',
                    formatter: function (value, row, index) {
                        if (row.odaStockType == 1) {
                            return "库存在库"
                        } else if (row.odaStockType == 2) {
                            return "项目在库"
                        } else {
                            return row.odaStockType
                        }
                    }
                },
                {title: '备注', field: 'odaRemark'},
                //{title: '箱号', field: 'odaCaseNo'},
                //{title: '装箱日期', field: 'odaBoxingDate'},
                //{title: '库房', field: 'odaWhiId'},
                {title: '外协类型', field: 'odaOutsourcedType',
                    formatter: function (value, row, index) {
                    if(value == 1){
                        return "成品件"
                    }else if(value == 2){
                        return "毛坯件"
                    }else{
                        return value
                    }
                    }},
                {title: '区位', field: 'odaPosition'},
                //{title: '记账日期', field: 'ityStorageDate'}
            ]
        });

        // 选择调拨记录模态框确定按钮点击事件
        /*$("#btn-commit").click(function () {

            $('#bootstrap-table1').bootstrapTable('destroy');
            $('#bootstrap-table2').bootstrapTable('destroy');
            // $('#bootstrap-table3').bootstrapTable('destroy');

            var row = table.bootstrapTable('getSelections');
            if (row.length == 0) {
                js.modal.warning("请至少选择一个物料");
                return false;
            } else {
                if (row[0].ardFormCode == row[row.length - 1].ardFormCode) {
                    var ardFormCode = row[0].ardFormCode;
                    js.post({
                        url: ctx + "half/halWarManage/allocationInWar/selectAllocation",
                        data: {
                            ardFormCode: ardFormCode
                        },
                        contentType: "application/x-www-form-urlencoded",
                        success: function (result) {
                            var rows1 = new Array();
                            var rows2 = new Array();
                            //var rows3 = new Array();
                            for (var i = 0; i < result.data.rows.length; i++) {
                                if (result.data.rows[i].ardType == 1) {
                                    rows1.push(result.data.rows[i]);
                                }
                                if (result.data.rows[i].ardType == 2) {
                                    rows2.push(result.data.rows[i]);
                                }
                                /!*if (result.data.rows[i].ardType == 3) {
                                    rows3.push(result.data.rows[i]);
                                }*!/
                            }
                            initTable1(rows1);
                            initTable2(rows2);
                            //initTable3(rows3);
                            $("#odrChecker").val(result.data.rows[0].odrChecker);
                            $("#odaWhiIdName").val(result.data.rows[0].odaWhiIdName);
                            js.modal.hide("modal-select");
                        }
                    });
                } else {
                    js.modal.warning("只能选择同一个调拨单");
                    return false;
                }
            }
        });*/

        /**
         * 表格搜索
         */
        /*$("#btn_inventorySearch").on('click', function () {
            js.table.search(table);
        });*/

        /**
         * 入库单编辑按钮点击事件
         * */
        /*$("#btn-edit").click(function () {
            _num2 = $("#odaNum").val();
            js.submit({
                url: ctx + "half/halWarManage/allocationInWar/saveAllocation",
                data: new FormData($("#updateForm")[0]),
                success: function (result) {
                    js.modal.hide("modal-update");
                    if (result) {
                        /!*if (_num1 != _num2) {
                            alert("修改入库数量，请删除出库单后进行保存！")
                        }*!/
                        $('#bootstrap-table2').bootstrapTable('destroy');
                        initTable2(result.data.rows);
                    }
                }
            })
        });*/

        /**
         * 点击保存
         */
        /*$("#btn-saveInBill").click(function () {

            if($("#odaMatType").val() == ""){
                js.modal.warning("请选择物料分类！")
                return;
            }
            var data1 = $('#bootstrap-table2').bootstrapTable('getData');
            //var data2 = $('#bootstrap-table3').bootstrapTable('getData');
            var ardId = $('#bootstrap-table1').bootstrapTable('getData');
            var form1 = $("#form1").serializeObject();
            var form2 = $("#form2").serializeObject();
            var data = {};
            data.data1 = data1;
            //data.data2 = data2;
            data.formData1 = form1;
            data.formData2 = form2;
            data.ardId = ardId;

            /!* if (_num1 != _num2 && data.data2 != null) {
                 alert("由于修改入库单数量或单位，该保存不能执行!\r\r请删除出库单信息后进行保存！")
             } else {*!/
            $.ajax({
                method: 'post',
                contentType: 'application/json; charset=utf-8',//关键是要加上这行
                traditional: true,//这使json格式的字符不会被转码
                data: JSON.stringify(data),
                url: ctx + "half/halWarManage/allocationInWar/create",
                success: function (result) {

                    if (result.msg == "操作成功") {

                        alert(result.msg);
                        $('#bootstrap-table1').bootstrapTable('destroy');
                        $('#bootstrap-table2').bootstrapTable('destroy');
                        //$('#bootstrap-table3').bootstrapTable('destroy');
                        $("#odrChecker").val("");
                        $("#odaWhiIdName").val("");
                        initTable1(1);
                        initTable2(1);
                        //initTable3(1);
                    }
                }
            });
        });*/
    })
</script>
</body>
</html>
